import request from '@/utils/request'

export function statisticDevice(dateUnit, dateRange) {
  return request({ url: `/online/management/statistic/device/${dateUnit}/${dateRange}`, method: 'GET'
  })
}
export function statisticTotalDevice() {
  return request({ url: `/online/management/statistic/device/total`, method: 'GET'
  })
}
export function statisticApplicationDownloadCount(params) {
  return request({ url: `/online/management/statistic/application/download/count`, params, method: 'GET'
  })
}
export function applicationCount() {
  return request({ url: `/online/management/statistic/application/count`, method: 'GET'
  })
}
export function applicationVersionTrend(params) {
  return request({ url: `/online/management/statistic/application/version/trend`, params, method: 'GET'
  })
}
export function appstoreApplicationCount() {
  return request({ url: `/online/management/statistic/appstore/application/count`, method: 'GET'
  })
}
export function appstoreApplicationVersionTrend(params) {
  return request({ url: `/online/management/statistic/appstore/application/version/trend`, params, method: 'GET'
  })
}
export function operatorActiveDeviceCount(params) {
  return request({ url: `/online/management/statistic/operator/active/device/count`, params, method: 'GET'
  })
}
export function newOperatorCountTrend(params) {
  return request({ url: `/online/management/statistic/operator/trend`, params, method: 'GET'
  })
}
export function newOperatorAccountTrend(params) {
  return request({ url: `/online/management/statistic/operator/account/trend`, params, method: 'GET'
  })
}
export function operatorActivityTrend(params) {
  return request({ url: `/online/management/statistic/operator/activity/trend`, params, method: 'GET'
  })
}
export function cmdFlyDeskTrend(params) {
  return request({ url: `/online/management/statistic/cmd/fly-desk/trend`, params, method: 'GET'
  })
}
export function cmdFlyKeyTrend(params) {
  return request({ url: `/online/management/statistic/cmd/fly-key/trend`, params, method: 'GET'
  })
}
export function appstoreApplicationDownloadCount(params) {
  return request({ url: `/online/management/statistic/appstore/application/download/count`, params, method: 'GET'
  })
}
export function appstoreApplicationDailyDownloadTrend(params) {
  return request({ url: `/online/management/statistic/appstore/application/download/trend`, params, method: 'GET'
  })
}
export function tomsApplicationDailyDownloadTrend(params) {
  return request({ url: `/online/management/statistic/application/download/count/trend`, params, method: 'GET'
  })
}

export function tomsVersionCount(operatorId) {
  return request({ url: `/online/management/statistic/system/${operatorId}/application/toms/count`, method: 'GET'
  })
}
